﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;
using IMPlant.Core.Data.Unity;
using SMTC.Model.TestCore;
using System.Data;
using SMTC.Dao;

namespace Plan.Dao.Test
{
    public class TestDao : BaseDao
    {
        private const string SELECT_TEST_SQL = @"select * from PP_UserAccountMapping WHERE UserType = @type AND AdAccount= @ad";

        private const string UPDATE_TEST_SQL = @"";

        public List<PP_UserAccountMapping> DaoTest()
        {
            DbParameter[] para = 
            {
                 DBparameterBuild.Build("@type",1)
                ,DBparameterBuild.Build("@ad","SU-4EA-Z01")
            };
            //获取list的例子
            List<PP_UserAccountMapping> list = DBTemplete.ExcuteGetList<PP_UserAccountMapping>(System.Data.CommandType.Text, SELECT_TEST_SQL, para);
            //获取DataTable的例子
            DataTable dt = DBTemplete.ExecuteFillDataTable(System.Data.CommandType.Text, SELECT_TEST_SQL, para);
            //获取数据集的例子
            DataSet ds = DBTemplete.ExcuteFillDataSet(System.Data.CommandType.Text, SELECT_TEST_SQL, para);
            //获取单个实例的例子
            PP_UserAccountMapping node = DBTemplete.ExcuteGetObject<PP_UserAccountMapping>(System.Data.CommandType.Text, SELECT_TEST_SQL, para);
            return list;

          
        }
    }


}
